-
Notifications
You must be signed in to change notification settings - Fork 18.4k
crypto/internal/fips140/aes: fix CTR generator #75973
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Fixed two issues in AVO based generator of amd64 asm code. 1. Updated golang.org/x/tools dependency to prevent build issue in Go 1.25. > golang.org/x/[email protected]/internal/tokeninternal/tokeninternal.go:64:9: > invalid array length -delta * delta (constant -256 of type int64) This error was caused by changes in layout of data structures in Go. Package golang.org/x/tools has a mirror of that struct and a static assert that it matches the Go's struct. 2. Changed the package name from crypto/aes to crypto/internal/fips140/aes. This fixed run time error: > ctr_amd64_asm.go:31: could not find function "ctrBlocks1Asm" and other errors Now the following works as expected: $ cd src/crypto/internal/fips140/aes/_asm/ctr/ $ go generate The command re-generates file "src/crypto/internal/fips140/aes/ctr_amd64.s".
|
This PR (HEAD: afc9f50) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/712920. Important tips:
|
|
Message from Emmanuel Odeke: Patch Set 1: Commit-Queue+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/712920. |
|
Message from Go LUCI: Patch Set 1: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2025-10-19T17:09:45Z","revision":"b0094ee218489c44ea8dc2b921acaecd9eac20f9"} Please don’t reply on this GitHub thread. Visit golang.org/cl/712920. |
|
Message from Emmanuel Odeke: Patch Set 1: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/712920. |
|
Message from Go LUCI: Patch Set 1: This CL has passed the run Please don’t reply on this GitHub thread. Visit golang.org/cl/712920. |
|
Message from Go LUCI: Patch Set 1: LUCI-TryBot-Result+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/712920. |
|
Message from Daniel McCarney: Patch Set 1: Code-Review+2 (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/712920. |
|
Message from Борис Нагаев: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/712920. |
|
Message from Борис Нагаев: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/712920. |
|
Message from David Chase: Patch Set 2: Code-Review+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/712920. |
|
Message from Roland Shoemaker: Patch Set 2: Code-Review+2 Please don’t reply on this GitHub thread. Visit golang.org/cl/712920. |
Fixed two issues in AVO based generator of amd64 asm code.
This error was caused by changes in layout of data structures in Go. Package
golang.org/x/tools has a mirror of that struct and a static assert that it
matches the Go's struct.
This fixed run time error:
Now the following works as expected:
$ cd src/crypto/internal/fips140/aes/_asm/ctr/
$ go generate
The command re-generates file "src/crypto/internal/fips140/aes/ctr_amd64.s".
Fixes #75972